## 设置Circos图的染色体外圈,染色体数目及长度,颜色等
## sscrofa.karyotype2.txt
#染色体 - 染色体编号(ID) 图显示名称(Label) 起始 结束 颜色
chr - 1 Chr1 0 274330532 black
chr - 2 Chr2 0 151935994 black
chr - 3 Chr3 0 132848913 black
chr - 4 Chr4 0 130910915 black
chr - 5 Chr5 0 104526007 black
chr - 6 Chr6 0 170843587 black
chr - 7 Chr7 0 121844099 black
chr - 8 Chr8 0 138966237 black
chr - 9 Chr9 0 139512083 black
chr - 10 Chr10 0 69359453 black
chr - 11 chr11 0 79169978 black
chr - 12 Chr12 0 61602749 black
chr - 13 Chr13 0 208334590 black
chr - 14 Chr14 0 141755446 black
chr - 15 Chr15 0 140412725 black
chr - 16 Chr16 0 79944280 black
chr - 17 Chr17 0 63494081 black
chr - 18 Chr18 0 55982971 black
## 设置Circos图的染色体外圈粗细,标签,刻度,染色体间空隙等
## ideogram.conf
<ideogram>
<spacing>
default = 0.006r #染色体相对空隙
<pairwise 1 18>
spacing = 9r #两条染色体之间的空隙
#</pairwise>
# <pairwise 8 9>
#spacing = 3r #两条染色体之间的空隙
</pairwise>
</spacing>
<tick> #这里画的是染色体上的小锯齿一样的单位刻度
# define position
spacing = 25u #每个ticks之间的空间,一般用染色体的单位u来表示,也就是1Mb(1*10^6)处做一个标记
size = 0.05p #tick线的长度,也就是“锯齿”里短的那些是多长
</tick>
chromosomes_radius = 0.96r
radius = 0.6r
thickness = 20p
fill = yes
#fill_color = grey
#stroke_color = dgrey
stroke_color = dgrey #轮廓颜色深灰色
stroke_thickness = 8p #轮廓粗细
# Minimum definition for ideogram labels.
show_label = yes #显示染色体标签
# see etc/fonts.conf for list of font names
label_font = bold #外圈染色体文字的字体
label_radius = 1r + 90p #外圈染色体半径的大小
label_size = 40p #外圈染色体文字的大小
label_parallel = yes
</ideogram>
## 绘图的conf文件,所有配值文件都由此文件调用,可设置染色体内刻度大小等
## circos.conf
karyotype = sscrofa.karyotype2.txt
#chromosomes_display_default = no
chromosomes_units = 1000000
#chromosomes_color= gq1=red,gq2=orange,gq3=green,gq4=blue,gq5=red,gq6=black,gq7=green,gq8=red,gq9=blue,gq10=green,gq11=red,gq12=green
<<include ideogram.conf>>
<<include ticks.conf>>
#<<include links.conf>>
<<include plot.conf>>
################################################################
# The remaining content is standard and required. It is imported
# from default files in the Circos distribution.
#
# These should be present in every Circos configuration file and
# overridden as required. To see the content of these files,
# look in etc/ in the Circos distribution.
<image>
# Included from Circos distribution.
<<include etc/image.conf>>
</image>
# RGB/HSV color definitions, color lists, location of fonts, fill patterns.
# Included from Circos distribution.
<<include etc/colors_fonts_patterns.conf>>
# Debugging, I/O an dother system parameters
# Included from Circos distribution.
<<include etc/housekeeping.conf>>
## 运行方式
win+R后,键入cmd,出现命令行界面
D:\download\circos-current\circos-0.69-9-2>bin\circos -conf circos.conf
## 数据预处理
# 拷贝文件,得到不同样本名称
ln -s /Parastor300s_G30S/sunxh/pig_wzs2/snv_indel2/all_cases_mutations ./
sed '1d' all_cases_mutations |awk '{print $5}' |uniq >sample.lst
# 根据不同样本名得到每个样本的snv突变位点,格式:染色体名 突变起点 突变终点 数目
for i in `cat sample.lst`; do grep "\b${i}\b" all_cases_mutations |awk '$NF=="snv"' |sort -n -k1,1 -k2,2 |awk '{print $1,$2}' |tr " " "\t" |awk '{print $1"\t"$2"\t"$2+1}' ${i} |awk '{print $0"\t"1}' >${i}.samples.snv.locus.add; done
# 根据不同样本名得到每个样本的indel突变位点,格式:染色体名 突变起点 突变终点 数目
for i in `cat sample.lst`; do grep "\b${i}\b" all_cases_mutations |awk '$NF=="indel"' |sort -n -k1,1 -k2,2 |awk '{print $1,$2}' |tr " " "\t" |awk '{print $1"\t"$2"\t"$2+1}' ${i} |awk '{print $0"\t"1}' >${i}.samples.indel.locus.add; done
## 主要需要修改的绘图的conf文件
## plot.conf
<plots>
<plot>
type = scatter
file = prepare/WZS666.samples.snv.locus.add
orientation = in
r1 = 0.90r
r0 = 0.90r
glyph_size = 5
color = orange
</plot>
<plot>
type = heatmap
file = prepare/WZS666.samples.indel.locus.add
r1 = 0.88r
r0 = 0.84r
orientation = in
color = orange
thickness = 15
</plot>
<plot>
type = scatter
file = prepare/F0-669.samples.snv.locus.add
r1 = 0.75r
r0 = 0.75r
glyph_size = 5
orientation = in
color = orange
</plot>
<plot>
type = heatmap
file = prepare/F0-669.samples.indel.locus.add
r1 = 0.73r
r0 = 0.69r
orientation = in
color = orange
thickness = 15
</plot>
<plot>
type = scatter
file = prepare/WZS659.samples.snv.locus.add
r1 = 0.60r
r0 = 0.60r
glyph_size = 5
orientation = in
color = orange
</plot>
<plot>
type = heatmap
file = prepare/WZS659.samples.indel.locus.add
r1 = 0.58r
r0 = 0.54r
orientation = in
color = orange
thickness = 15
</plot>
<plot>
type = scatter
file = prepare/F0-657.samples.snv.locus.add
r1 = 0.45r
r0 = 0.45r
glyph_size = 5
orientation = in
color = orange
</plot>
<plot>
type = heatmap
file = prepare/F0-657.samples.indel.locus.add
r1 = 0.43r
r0 = 0.39r
orientation = in
color = orange
thickness = 15
</plot>
<plot>
type = scatter
file = prepare/WZS681.samples.snv.locus.add
r1 = 0.30r
r0 = 0.30r
glyph_size = 5
orientation = in
color = orange
</plot>
<plot>
type = heatmap
file = prepare/WZS681.samples.indel.locus.add
r1 = 0.28r
r0 = 0.24r
orientation = in
color = orange
thickness = 15
</plot>
<plot>
type = scatter
file = prepare/05.samples.snv.locus.add
r1 = 0.15r
r0 = 0.15r
glyph_size = 5
orientation = in
color = orange
</plot>
<plot>
type = heatmap
file = prepare/05.samples.indel.locus.add
r1 = 0.13r
r0 = 0.09r
orientation = in
color = orange
thickness = 15
</plot>
</plots>
circos_6samples_snp_indel
## 数据预处理
# 生成每个样本的空的somatic步骤的突变文件
for i in `cat sample.lst`; do touch ${i}.samples.somatic.snp.locus.add; done
for i in `cat sample.lst`; do touch ${i}.samples.somatic.indel.locus.add; done
# 根据不同样本名得到每个样本的edit_step的snv突变位点,格式:染色体名 突变起点 突变终点 数目
for i in `cat sample.lst`; do grep "\b${i}\b" all_cases_mutations |grep "edited_step" |awk '$NF=="snv"' |sort -n -k1,1 -k2,2 |awk '{print $1,$2}' |tr " " "\t" |awk '{print $1"\t"$2"\t"$2+1}' ${i} |awk '{print $0"\t"1}' >${i}.samples.edited_step.snp.locus.add; done
# 根据不同样本名得到每个样本的edit_step步骤的indel突变位点,格式:染色体名 突变起点 突变终点 数目
for i in `cat sample.lst`; do grep "\b${i}\b" all_cases_mutations |grep "edited_step" |awk '$NF=="indel"' |sort -n -k1,1 -k2,2 |awk '{print $1,$2}' |tr " " "\t" |awk '{print $1"\t"$2"\t"$2+1}' ${i} |awk '{print $0"\t"1}' >${i}.samples.edited_step.indel.locus.add; done
# 根据不同样本名得到每个样本的nuclear_transfor_step步骤的snv突变位点,格式:染色体名 突变起点 突变终点 数目
for i in `cat sample.lst`; do grep "\b${i}\b" all_cases_mutations |grep "nuclear_transfor_step" |awk '$NF=="snv"' |sort -n -k1,1 -k2,2 |awk '{print $1,$2}' |tr " " "\t" |awk '{print $1"\t"$2"\t"$2+1}' ${i} |awk '{print $0"\t"1}' >${i}.samples.nuclear_transfor_step.snp.locus.add; done
# 根据不同样本名得到每个样本的nuclear_transfor_step步骤的indel突变位点,格式:染色体名 突变起点 突变终点 数目
for i in `cat sample.lst`; do grep "\b${i}\b" all_cases_mutations |grep "nuclear_transfor_step" |awk '$NF=="indel"' |sort -n -k1,1 -k2,2 |awk '{print $1,$2}' |tr " " "\t" |awk '{print $1"\t"$2"\t"$2+1}' ${i} |awk '{print $0"\t"1}' >${i}.samples.nuclear_transfor_step.indel.locus.add; done
## 主要需要修改的绘图的conf文件
## plot.conf
<plots>
<plot>
type = scatter
file = prepare/WZS666.samples.somatic.snp.locus.add
orientation = in
r1 = 0.95r
r0 = 0.95r
glyph_size = 5
color = red
</plot>
<plot>
type = heatmap
file = prepare/WZS666.samples.somatic.indel.locus.add
orientation = in
r1 = 0.935r
r0 = 0.915r
thickness = 15
color = red
</plot>
<plot>
type = scatter
file = prepare/WZS666.samples.edited_step.snp.locus.add
orientation = in
r1 = 0.900r
r0 = 0.900r
glyph_size = 5
thickness = 15
color = blue
</plot>
<plot>
type = heatmap
file = prepare/WZS666.samples.edited_step.indel.locus.add
orientation = in
r1 = 0.885r
r0 = 0.865r
thickness = 15
color = blue
</plot>
<plot>
type = scatter
file = prepare/WZS666.samples.nuclear_transfor_step.snp.locus.add
r1 = 0.850r
r0 = 0.850r
orientation = in
glyph_size = 5
color = green
</plot>
<plot>
type = heatmap
file = prepare/WZS666.samples.nuclear_transfor_step.indel.locus.add
orientation = in
r1 = 0.835r
r0 = 0.815r
thickness = 15
color = green
</plot>
<plot>
type = scatter
file = prepare/F0-669.samples.somatic.snp.locus.add
r1 = 0.805r
r0 = 0.805r
thickness = 15
glyph_size = 5
orientation = in
color = red
</plot>
<plot>
type = heatmap
file = prepare/F0-669.samples.somatic.indel.locus.add
r1 = 0.790r
r0 = 0.770r
thickness = 15
orientation = in
color = red
</plot>
<plot>
type = scatter
file = prepare/F0-669.samples.edited_step.snp.locus.add
r1 = 0.755r
r0 = 0.755r
orientation = in
glyph_size = 5
color = blue
</plot>
<plot>
type = heatmap
file = prepare/F0-669.samples.edited_step.indel.locus.add
r1 = 0.740r
r0 = 0.720r
thickness = 15
orientation = in
color = blue
</plot>
<plot>
type = scatter
file = prepare/F0-669.samples.nuclear_transfor_step.snp.locus.add
r1 = 0.705r
r0 = 0.705r
thickness = 15
orientation = in
glyph_size = 5
color = green
</plot>
<plot>
type = heatmap
file = prepare/F0-669.samples.nuclear_transfor_step.indel.locus.add
r1 = 0.690r
r0 = 0.670r
thickness = 15
orientation = in
color = green
</plot>
<plot>
type = scatter
file = prepare/WZS659.samples.somatic.snp.locus.add
r1 = 0.660r
r0 = 0.660r
glyph_size = 5
orientation = in
color = red
</plot>
<plot>
type = heatmap
file = prepare/WZS659.samples.somatic.indel.locus.add
r1 = 0.645r
r0 = 0.625r
thickness = 15
orientation = in
color = red
</plot>
<plot>
type = scatter
file = prepare/WZS659.samples.edited_step.snp.locus.add
r1 = 0.610r
r0 = 0.610r
glyph_size = 5
orientation = in
color = blue
</plot>
<plot>
type = heatmap
file = prepare/WZS659.samples.edited_step.indel.locus.add
r1 = 0.595r
r0 = 0.575r
thickness = 15
orientation = in
color = blue
</plot>
<plot>
type = scatter
file = prepare/WZS659.samples.nuclear_transfor_step.snp.locus.add
r1 = 0.560r
r0 = 0.560r
glyph_size = 5
orientation = in
color = green
</plot>
<plot>
type = heatmap
file = prepare/WZS659.samples.nuclear_transfor_step.indel.locus.add
r1 = 0.545r
r0 = 0.525r
thickness = 15
orientation = in
color = green
</plot>
<plot>
type = scatter
file = prepare/F0-657.samples.somatic.snp.locus.add
r1 = 0.515r
r0 = 0.515r
orientation = in
glyph_size = 5
color = red
</plot>
<plot>
type = heatmap
file = prepare/F0-657.samples.somatic.indel.locus.add
r1 = 0.500r
r0 = 0.480r
thickness = 15
orientation = in
color = red
</plot>
<plot>
type = scatter
file = prepare/F0-657.samples.edited_step.snp.locus.add
r1 = 0.465r
r0 = 0.465r
orientation = in
glyph_size = 5
color = blue
</plot>
<plot>
type = heatmap
file = prepare/F0-657.samples.edited_step.indel.locus.add
r1 = 0.450r
r0 = 0.430r
thickness = 15
orientation = in
color = blue
</plot>
<plot>
type = scatter
file = prepare/F0-657.samples.nuclear_transfor_step.snp.locus.add
r1 = 0.415r
r0 = 0.415r
glyph_size = 5
orientation = in
color = green
</plot>
<plot>
type = heatmap
file = prepare/F0-657.samples.nuclear_transfor_step.indel.locus.add
r1 = 0.400r
r0 = 0.380r
thickness = 15
orientation = in
color = green
</plot>
<plot>
type = scatter
file = prepare/WZS681.samples.somatic.snp.locus.add
r1 = 0.370r
r0 = 0.370r
glyph_size = 5
orientation = in
color = red
</plot>
<plot>
type = heatmap
file = prepare/WZS681.samples.somatic.indel.locus.add
r1 = 0.355r
r0 = 0.335r
thickness = 15
orientation = in
color = red
</plot>
<plot>
type = scatter
file = prepare/WZS681.samples.edited_step.snp.locus.add
r1 = 0.320r
r0 = 0.320r
glyph_size = 5
orientation = in
color = blue
</plot>
<plot>
type = heatmap
file = prepare/WZS681.samples.edited_step.indel.locus.add
r1 = 0.305r
r0 = 0.285r
thickness = 15
orientation = in
color = blue
</plot>
<plot>
type = scatter
file = prepare/WZS681.samples.nuclear_transfor_step.snp.locus.add
r1 = 0.270r
r0 = 0.270r
orientation = in
glyph_size = 5
color = green
</plot>
<plot>
type = heatmap
file = prepare/WZS681.samples.nuclear_transfor_step.indel.locus.add
r1 = 0.255r
r0 = 0.235r
thickness = 15
orientation = in
color = green
</plot>
<plot>
type = scatter
file = prepare/05.samples.somatic.snp.locus.add
r1 = 0.225r
r0 = 0.225r
glyph_size = 5
orientation = in
color = red
</plot>
<plot>
type = heatmap
file = prepare/05.samples.somatic.indel.locus.add
r1 = 0.210r
r0 = 0.190r
thickness = 15
orientation = in
color = red
</plot>
<plot>
type = scatter
file = prepare/05.samples.edited_step.snp.locus.add
r1 = 0.175r
r0 = 0.175r
glyph_size = 5
orientation = in
color = blue
</plot>
<plot>
type = heatmap
file = prepare/05.samples.edited_step.indel.locus.add
r1 = 0.160r
r0 = 0.140r
thickness = 15
orientation = in
color = blue
</plot>
<plot>
type = scatter
file = prepare/05.samples.nuclear_transfor_step.snp.locus.add
r1 = 0.125r
r0 = 0.125r
orientation = in
glyph_size = 5
color = green
</plot>
<plot>
type = heatmap
file = prepare/05.samples.nuclear_transfor_step.indel.locus.add
r1 = 0.110r
r0 = 0.090r
thickness = 15
orientation = in
color = green
</plot>
</plots>
circos_6samples_edit_nt_dot_snp_line_indel
## 数据预处理
# 拷贝文件,得到不同添加物质的样本名称
cp /Parastor300s_G30S/sunxh/pig_wzs2/snv_indel2/all_snv_indel.control ./
sed '1d' all_snv_indel.control |tr "," "\t" |awk '{print $18 }' |sort |uniq >sample.lst
# 由于名称重叠,删除WZS14EFO_214-Cas9High和WZS14EFO_214-Cas9Low
cat sample.lst |sed '6d;7d' >sample1.lst
# 提取不同添加物质的样本的snv突变位点,格式:染色体名 突变起点 突变终点 数目
for i in `cat sample1.lst`; do grep ${i} all_snv_indel.control |tr "," "\t" |awk '$6=="snv"' |sort -n -k2,2 -k3,3 |awk '{print $2,$3}' |awk '{print $1"\t"$2"\t"$2+1}' |awk '{print $0"\t"1}' >${i}.snv.txt;done
awk -F"," '$18=="WZS14EFO_214-Cas9"' all_snv_indel.control |tr "," "\t" |awk '$6=="snv"' |sort -n -k2,2 -k3,3 |awk '{print $2,$3}' |awk '{print $1"\t"$2"\t"$2+1}' |awk '{print $0"\t"1}' >WZS14EFO_214-Cas9.snv.txt
awk -F"," '$18=="WZS14EFO_214-Cas9High"' all_snv_indel.control |tr "," "\t" |awk '$6=="snv"' |sort -n -k2,2 -k3,3 |awk '{print $2,$3}' |awk '{print $1"\t"$2"\t"$2+1}' |awk '{print $0"\t"1}' >WZS14EFO_214-Cas9High.snv.txt
awk -F"," '$18=="WZS14EFO_214-Cas9Low"' all_snv_indel.control |tr "," "\t" |awk '$6=="snv"' |sort -n -k2,2 -k3,3 |awk '{print $2,$3}' |awk '{print $1"\t"$2"\t"$2+1}' |awk '{print $0"\t"1}' >WZS14EFO_214-Cas9Low.snv.txt
# 提取不同添加物质的样本的indel突变位点,格式:染色体名 突变起点 突变终点 数目
for i in `cat sample1.lst`; do grep ${i} all_snv_indel.control |tr "," "\t" |awk '$6=="indel"' |sort -n -k2,2 -k3,3 |awk '{print $2,$3}' |awk '{print $1"\t"$2"\t"$2+1}' |awk '{print $0"\t"1}' >${i}.onlyindel.txt;done
awk -F"," '$18=="WZS14EFO_214-Cas9"' all_snv_indel.control |tr "," "\t" |awk '$6=="indel"' |sort -n -k2,2 -k3,3 |awk '{print $2,$3}' |awk '{print $1"\t"$2"\t"$2+1}' |awk '{print $0"\t"1}' >WZS14EFO_214-Cas9.onlyindel.txt
awk -F"," '$18=="WZS14EFO_214-Cas9High"' all_snv_indel.control |tr "," "\t" |awk '$6=="indel"' |sort -n -k2,2 -k3,3 |awk '{print $2,$3}' |awk '{print $1"\t"$2"\t"$2+1}' |awk '{print $0"\t"1}' >WZS14EFO_214-Cas9High.onlyindel.txt
awk -F"," '$18=="WZS14EFO_214-Cas9Low"' all_snv_indel.control |tr "," "\t" |awk '$6=="indel"' |sort -n -k2,2 -k3,3 |awk '{print $2,$3}' |awk '{print $1"\t"$2"\t"$2+1}' |awk '{print $0"\t"1}' >WZS14EFO_214-Cas9Low.onlyindel.txt
## 主要需要修改的绘图的conf文件
## plot.conf
<plots>
<plot>
type = scatter
file = prepare/WZS01853-ZF3_153-Control.snv.txt
orientation = in
r1 = 0.900r
r0 = 0.900r
glyph_size = 5
color = blue
</plot>
<plot>
type = heatmap
file = prepare/WZS01853-ZF3_153-Control.onlyindel.txt
orientation = in
r1 = 0.885r
r0 = 0.865r
thickness = 15
color = blue
</plot>
<plot>
type = scatter
file = prepare/WZS14EFO_214-Control.snv.txt
r1 = 0.840r
r0 = 0.840r
glyph_size = 5
orientation = in
color = blue
</plot>
<plot>
type = heatmap
file = prepare/WZS14EFO_214-Control.onlyindel.txt
r1 = 0.825r
r0 = 0.805r
thickness = 15
orientation = in
color = blue
</plot>
<plot>
type = scatter
file = prepare/WZS01853-ZF3_153-Cas9.snv.txt
r1 = 0.745r
r0 = 0.745r
glyph_size = 5
orientation = in
color = red
</plot>
<plot>
type = heatmap
file = prepare/WZS01853-ZF3_153-Cas9.onlyindel.txt
r1 = 0.730r
r0 = 0.710r
orientation = in
color = red
</plot>
<plot>
type = scatter
file = prepare/WZS14EFO_214-Cas9.snv.txt
r1 = 0.685r
r0 = 0.685r
glyph_size = 5
orientation = in
color = red
</plot>
<plot>
type = heatmap
file = prepare/WZS14EFO_214-Cas9.onlyindel.txt
r1 = 0.670r
r0 = 0.650r
orientation = in
color = red
</plot>
<plot>
type = scatter
file = prepare/WZS14EFO_214-Cas9High.snv.txt
r1 = 0.590r
r0 = 0.590r
glyph_size = 5
orientation = in
color = orange
</plot>
<plot>
type = heatmap
file = prepare/WZS14EFO_214-Cas9High.onlyindel.txt
r1 = 0.575r
r0 = 0.555r
orientation = in
color = orange
</plot>
<plot>
type = scatter
file = prepare/WZS14EFO_214-Cas9Low.snv.txt
r1 = 0.530r
r0 = 0.530r
glyph_size = 5
orientation = in
color = orange
</plot>
<plot>
type = heatmap
file = prepare/WZS14EFO_214-Cas9Low.onlyindel.txt
r1 = 0.515r
r0 = 0.495r
orientation = in
color = orange
</plot>
<plot>
type = scatter
file = prepare/WZS01853-ZF3_153-sgRNACas9-KO-.snv.txt
r1 = 0.435r
r0 = 0.435r
glyph_size = 5
orientation = in
color = purple
</plot>
<plot>
type = heatmap
file = prepare/WZS01853-ZF3_153-sgRNACas9-KO-.onlyindel.txt
r1 = 0.420r
r0 = 0.400r
orientation = in
color = purple
</plot>
<plot>
type = scatter
file = prepare/WZS14EFO_214-sgRNACas9-KO-.snv.txt
r1 = 0.375r
r0 = 0.375r
glyph_size = 5
orientation = in
color = purple
</plot>
<plot>
type = heatmap
file = prepare/WZS14EFO_214-sgRNACas9-KO-.onlyindel.txt
r1 = 0.360r
r0 = 0.340r
orientation = in
color = purple
</plot>
<plot>
type = scatter
file = prepare/WZS01853-ZF3_153-GTKOA39.snv.txt
r1 = 0.280r
r0 = 0.280r
glyph_size = 5
orientation = in
color = yellow
</plot>
<plot>
type = heatmap
file = prepare/WZS01853-ZF3_153-GTKOA39.onlyindel.txt
r1 = 0.265r
r0 = 0.245r
orientation = in
color = yellow
</plot>
<plot>
type = scatter
file = prepare/WZS14EFO_214-GTKO-A10.snv.txt
r1 = 0.220r
r0 = 0.220r
glyph_size = 5
orientation = in
color = yellow
</plot>
<plot>
type = heatmap
file = prepare/WZS14EFO_214-GTKO-A10.onlyindel.txt
r1 = 0.205r
r0 = 0.185r
orientation = in
color = yellow
</plot>
<plot>
type = scatter
file = prepare/WZS14EFO_214-GTKO-A7.snv.txt
r1 = 0.160r
r0 = 0.160r
glyph_size = 5
orientation = in
color = yellow
</plot>
<plot>
type = heatmap
file = prepare/WZS14EFO_214-GTKO-A7.onlyindel.txt
r1 = 0.145r
r0 = 0.125r
orientation = in
color = yellow
</plot>
</plots>
circos_11samples_cas_snv_indel
## 数据预处理
# 拷贝文件
cp /Parastor300s_G30S/sunxh/pig_wzs2/off_target/cas-offinder.NAG.output.txt.bed ./ #(7574)
cp /Parastor300s_G30S/sunxh/pig_wzs2/off_target/cas-offinder.NGG.output.txt.bed ./ #(4636)
cp /Parastor300s_G30S/zhangjj/Pig/circos/chrom.size ./
# 分割染色体大小为1Mb
bedtools makewindows -g chrom.size -w 1000000 >1Mbp.chrom.size
for i in {1..18}; do grep -e "^${i}\b" 1Mbp.chrom.size >${i}.1Mbp.chrom.size; done
less 1Mbp.chrom.size |awk '{print $1":"$2"-"$3}' >1Mbp.chrom.size.chr
# 统计PAM为NAG的脱靶位点在染色体上的分布位点及数目,格式:染色体名 突变起点 突变终点 数目
cat cas-offinder.NAG.output.txt.bed |sort -k1,1 -k2,2n | bgzip >cas-offinder.NAG.output.txt.bed.sort.gz
tabix -p bed cas-offinder.NAG.output.txt.bed.sort.gz
for i in `cat 1Mbp.chrom.size.chr`; do tabix cas-offinder.NAG.output.txt.bed.sort.gz ${i} |wc -l >>1Mbp.chrom.size.chr.NAG.num ;done
cat `ls *.1Mbp.chrom.size |sort -n |tr "\n" " " ` |paste - 1Mbp.chrom.size.chr.NAG.num |tr " " "\t" >1Mbp.chrom.size.chr.NAG.num.bed
for i in {1..18}; do grep -e "^${i}\b" 1Mbp.chrom.size.chr.NAG.num.bed >${i}.cas-offinder.NAG.output.txt.bed.number ;done
# 统计PAM为NGG的脱靶位点在染色体上的分布位点及数目,格式:染色体名 突变起点 突变终点 数目
cat cas-offinder.NGG.output.txt.bed |sort -k1,1 -k2,2n | bgzip >cas-offinder.NGG.output.txt.bed.sort.gz
tabix -p bed cas-offinder.NGG.output.txt.bed.sort.gz
for i in `cat 1Mbp.chrom.size.chr`; do tabix cas-offinder.NGG.output.txt.bed.sort.gz ${i} |wc -l >>1Mbp.chrom.size.chr.NGG.num ;done
cat `ls *.1Mbp.chrom.size |sort -n |tr "\n" " " ` |paste - 1Mbp.chrom.size.chr.NGG.num |tr " " "\t" >1Mbp.chrom.size.chr.NGG.num.bed
for i in {1..18}; do grep -e "^${i}\b" 1Mbp.chrom.size.chr.NGG.num.bed >${i}.cas-offinder.NGG.output.txt.bed.number ;done
## 主要需要修改的绘图的conf文件
## plot.conf
<plots>
<plot>
type = histogram
file = prepare/14.cas-offinder.NAG.output.txt.bed.number
r1 = 0.94r
r0 = 0.70r
orientation = out
color = red
<axes>
<axis>
color = vlgrey
thickness = 0.8
position = 0.006
</axis>
<axis>
color = vlgrey
thickness = 0.8
spacing = 1.0
</axis>
</axes>
</plot>
<plot>
type = histogram
file = prepare/1.cas-offinder.NAG.output.txt.bed.number
orientation = out #r0和r1分别设置圆环的内径和外径, orientation = in代表 y = 0 位于r1上, #orientation = out表示y = 0位于r0上
r1 = 0.92r
r0 = 0.70r
max_gap = 1u
color = blue
</plot>
<plot>
type = histogram
file = prepare/2.cas-offinder.NAG.output.txt.bed.number
r1 = 0.88r
r0 = 0.70r
orientation = out
color = red
</plot>
<plot>
type = histogram
file = prepare/3.cas-offinder.NAG.output.txt.bed.number
r1 = 0.92r
r0 = 0.70r
orientation = out
color = green
</plot>
<plot>
type = histogram
file = prepare/4.cas-offinder.NAG.output.txt.bed.number
r1 = 0.92r
r0 = 0.70r
orientation = out
color = orange
</plot>
<plot>
type = histogram
file = prepare/5.cas-offinder.NAG.output.txt.bed.number
r1 = 0.90r
r0 = 0.70r
orientation = out
color = grey
</plot>
<plot>
type = histogram
file = prepare/6.cas-offinder.NAG.output.txt.bed.number
r1 = 0.92r
r0 = 0.70r
orientation = out
color = purple
</plot>
<plot>
type = histogram
file = prepare/7.cas-offinder.NAG.output.txt.bed.number
r1 = 0.90r
r0 = 0.70r
orientation = out
color = blue
</plot>
<plot>
type = histogram
file = prepare/8.cas-offinder.NAG.output.txt.bed.number
r1 = 0.90r
r0 = 0.70r
orientation = out
color = red
</plot>
<plot>
type = histogram
file = prepare/9.cas-offinder.NAG.output.txt.bed.number
r1 = 0.92r
r0 = 0.70r
orientation = out
color = green
</plot>
<plot>
type = histogram
file = prepare/10.cas-offinder.NAG.output.txt.bed.number
r1 = 0.84r
r0 = 0.70r
orientation = out
color = orange
</plot>
<plot>
type = histogram
file = prepare/11.cas-offinder.NAG.output.txt.bed.number
r1 = 0.88r
r0 = 0.70r
orientation = out
color = grey
</plot>
<plot>
type = histogram
file = prepare/12.cas-offinder.NAG.output.txt.bed.number
r1 = 0.86r
r0 = 0.70r
orientation = out
color = purple
</plot>
<plot>
type = histogram
file = prepare/13.cas-offinder.NAG.output.txt.bed.number
r1 = 0.92r
r0 = 0.70r
orientation = out
color = blue
</plot>
<plot>
type = histogram
file = prepare/15.cas-offinder.NAG.output.txt.bed.number
r1 = 0.92r
r0 = 0.70r
orientation = out
color = green
</plot>
<plot>
type = histogram
file = prepare/16.cas-offinder.NAG.output.txt.bed.number
r1 = 0.90r
r0 = 0.70r
orientation = out
color = orange
</plot>
<plot>
type = histogram
file = prepare/17.cas-offinder.NAG.output.txt.bed.number
r1 = 0.82r
r0 = 0.70r
orientation = out
color = grey
</plot>
<plot>
type = histogram
file = prepare/18.cas-offinder.NAG.output.txt.bed.number
r1 = 0.90r
r0 = 0.70r
orientation = out
color = purple
</plot>
<plot>
type = histogram
file = prepare/7.cas-offinder.NGG.output.txt.bed.number
r1 = 0.64r
r0 = 0.40r
orientation = out
color = blue
<axes>
<axis>
color = vlgrey
thickness = 0.8
position = 0.006
</axis>
<axis>
color = vlgrey
thickness = 0.8
spacing = 1.0
</axis>
</axes>
</plot>
<plot>
type = histogram
file = prepare/1.cas-offinder.NGG.output.txt.bed.number
orientation = out
r1 = 0.54r
r0 = 0.40r
color = blue
</plot>
<plot>
type = histogram
file = prepare/2.cas-offinder.NGG.output.txt.bed.number
r1 = 0.54r
r0 = 0.40r
orientation = out
color = red
</plot>
<plot>
type = histogram
file = prepare/3.cas-offinder.NGG.output.txt.bed.number
r1 = 0.54r
r0 = 0.40r
orientation = out
color = green
</plot>
<plot>
type = histogram
file = prepare/4.cas-offinder.NGG.output.txt.bed.number
r1 = 0.58r
r0 = 0.40r
orientation = out
color = orange
</plot>
<plot>
type = histogram
file = prepare/5.cas-offinder.NGG.output.txt.bed.number
r1 = 0.56r
r0 = 0.40r
orientation = out
color = grey
</plot>
<plot>
type = histogram
file = prepare/6.cas-offinder.NGG.output.txt.bed.number
r1 = 0.52r
r0 = 0.40r
orientation = out
color = purple
</plot>
<plot>
type = histogram
file = prepare/8.cas-offinder.NGG.output.txt.bed.number
r1 = 0.54r
r0 = 0.40r
orientation = out
color = red
</plot>
<plot>
type = histogram
file = prepare/9.cas-offinder.NGG.output.txt.bed.number
r1 = 0.58r
r0 = 0.40r
orientation = out
color = green
</plot>
<plot>
type = histogram
file = prepare/10.cas-offinder.NGG.output.txt.bed.number
r1 = 0.56r
r0 = 0.40r
orientation = out
color = orange
</plot>
<plot>
type = histogram
file = prepare/11.cas-offinder.NGG.output.txt.bed.number
r1 = 0.54r
r0 = 0.40r
orientation = out
color = grey
</plot>
<plot>
type = histogram
file = prepare/12.cas-offinder.NGG.output.txt.bed.number
r1 = 0.50r
r0 = 0.40r
orientation = out
color = purple
</plot>
<plot>
type = histogram
file = prepare/13.cas-offinder.NGG.output.txt.bed.number
r1 = 0.58r
r0 = 0.40r
orientation = out
color = blue
</plot>
<plot>
type = histogram
file = prepare/14.cas-offinder.NGG.output.txt.bed.number
r1 = 0.54r
r0 = 0.40r
orientation = out
color = red
</plot>
<plot>
type = histogram
file = prepare/15.cas-offinder.NGG.output.txt.bed.number
r1 = 0.52r
r0 = 0.40r
orientation = out
color = green
</plot>
<plot>
type = histogram
file = prepare/16.cas-offinder.NGG.output.txt.bed.number
r1 = 0.58r
r0 = 0.40r
orientation = out
color = orange
</plot>
<plot>
type = histogram
file = prepare/17.cas-offinder.NGG.output.txt.bed.number
r1 = 0.54r
r0 = 0.40r
orientation = out
color = grey
</plot>
<plot>
type = histogram
file = prepare/18.cas-offinder.NGG.output.txt.bed.number
r1 = 0.54r
r0 = 0.40r
orientation = out
color = purple
</plot>
</plots>
ciscos_NGG_NAG